@collapse-prefix-cls: ~"@{css-prefix}collapse";

.@{collapse-prefix-cls}{
  background-color: @color-functional-white;
  border-radius: 3px;
  border: 1px solid @collapse-border-color;
  width: 100%;
  &-simple{
    border-left: none;
    border-right: none;
    background-color: @background-color-base;
    border-radius: 0;
  }

  &-ghost{
    border: none;
    background: none;
    border-radius: 0;
  }

  & > &-item{
    border-top: 1px solid @collapse-border-color;
    &:first-child {
      border-top: 0;
    }

    > .@{collapse-prefix-cls}-header {
      display: flex;
      align-items: center;
      height: 40px;
      // line-height: 40px;
      padding-left: 12px;
      color: @collapse-text-color;
      cursor: pointer;
      position: relative;
      border-bottom: 1px solid transparent;
      transition: all @transition-time @ease-in-out;

      &:hover {
        // background-color: @color-bg-hover;
        color: @primary-color;
      }

      > i {
        transition: transform @transition-time @ease-in-out;
        margin-right: 6px;
      }
    }

    &-no-arrow {
      .@{collapse-prefix-cls}-content {
        padding-left: 12px;
      }
    }
  }
  & > &-item-disabled> &-header {
    cursor: not-allowed;
    color: @collapse-disabled-text-color;
    &:hover {
      background: none;
      color: @collapse-disabled-text-color;
    }
  }

  & > &-item-disabled> &-content {
    cursor: not-allowed;
    color: @collapse-disabled-text-color;
    background: @collapse-disabled-content-bg-color;
    &:hover{
      background: @collapse-disabled-content-bg-color;
      color: @collapse-disabled-text-color;
    }
  }

  &  > &-item&-item-active > &-header{
    border-bottom: 1px solid @collapse-border-color;
  }
  &-simple > &-item&-item-active > &-header{
    border-bottom: 1px solid transparent;
  }

  &-ghost > &-item{
    border: none;
  }
  &-ghost > &-item&-item-active > &-header{
    border: none;
  }
  &-ghost > &-item&-item-active > &-content{
    border: none;
    margin-left: 12px;
    padding-left: 18px;
  }

  &  > &-item&-item-active > &-header > i{
    transform: rotate(90deg);
  }

  &-content{
    //display: none;
    //overflow: hidden;
    color: @collapse-text-color;
    padding: 0 12px 0 30px;
    background: @collapse-content-bg-color;

    & > &-box {
      padding-top: 16px;
      padding-bottom: 16px;
    }
  }
  &-simple > &-item > &-content > &-content-box{
    padding-top: 0;
  }
  &-item-active > &-content{
    //display: block;
  }
  &-item:last-child {
    > .@{collapse-prefix-cls}-content {
      border-radius: 0 0 3px 3px;
    }
  }
}
